import { PropType } from "vue";

export const messageCardProps = {
    data: {
        type: Array as () => IMessageCardData[],
        default: () => []
    },
    renderItem: {
        type: Function,
        default: null
    },
    onClick: {
        type: Function as PropType<IMessageCardClick>,
        default: null
    }
}

type IMessageCardClick = (data: IMessageCardData) => void;
export interface IMessageCardData {
    text: string;
    time?: string;
    id?: string | number;
}